/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.sales.generics.client.presenter.events;

import com.google.gwt.event.shared.GwtEvent;
import com.google.gwt.json.client.JSONObject;

/**
 *
 * @author v
 */
public class EditRecordEvent extends GwtEvent<EditRecordHandler> {

    public static final Type<EditRecordHandler> TYPE = new Type<>();
    private JSONObject record;

    public EditRecordEvent(JSONObject record) {
        this.record = record;
    }

    @Override
    public Type<EditRecordHandler> getAssociatedType() {
        return TYPE;
    }

    @Override
    protected void dispatch(EditRecordHandler handler) {
        handler.edit(record);
    }

}
